using System;
using System.Collections.Generic;
using System.Text;

namespace SqlTools.CodeGenerator.Data
{
	public class TableCollection : List<Table>
	{
		public Table this[string name]
		{
			get
			{
				foreach ( Table table in this )
				{
					if ( table.TableName == name )
						return table;
				}

				return null;
			}
		}

		public bool Contains(string name)
		{
			return ( this[name] != null );
		}
	}
}
